'use strict'
const Router = require('koa-router')
const User = require('../controllers/user') 
const createToken = require('../token/createToken')
const RedisStore = require('../config/redis')

const router = Router({
  prefix: '/user'
});
router.post('/logintest',User.signupTest)
router.post('/login',User.signup)
// user  
router.post('/create',User.create)
router.post('/update',User.update)
router.post('/list',User.list)
router.post('/password/reset',User.passwordReset)
router.post('/role/create',User.roleCreate)
router.post('/role/update',User.roleUpdate)
router.post('/role/list',User.roleList)
router.post('/resource/create',User.resourceCreate)
router.post('/resource/delete',User.resourceDelete)
router.post('/resource/update',User.resourceUpdate)
router.post('/resource/find',User.resourceFind)
router.post('/resource/list',User.resourceList)
router.post('/resource/list/menu',User.resourceListMenu)

// for require auto in index.js
module.exports = router;